/* vue */
import { defineComponent } from "vue";
/* mixin */
import VersionControlBaseMixin from '@src/mixins/versionControlMixin/base';
/* version other */
import {
  isShowEmail,
  isShowSystemInitGuide,
  isShowGuide
} from '@shb-lib/version';
/* util */
import { isFalsy } from "@src/util/type";

export default defineComponent({
  name: "version-control-other-mixin",
  mixins: [VersionControlBaseMixin],
  computed: {
    /** 
     * @description 其他模块 版本控制
    */
    otherVersionControl(): Record<string, boolean> {
      return {
        isShowEmail: isShowEmail(this._versionControlMap),
        isShowSystemInitGuide: isShowSystemInitGuide(this._versionControlMap),
        isShowGuide: isShowGuide(this._versionControlMap),
        isNotShowGuide: isFalsy(isShowGuide(this._versionControlMap))
      }
    },
    _isShowEmail(): boolean {
      return this.otherVersionControl.isShowEmail
    },
    _isShowSystemInitGuide(): boolean {
      return this.otherVersionControl.isShowSystemInitGuide
    },
    _isShowGuide(): boolean {
      return this.otherVersionControl.isShowGuide
    },
    _isNotShowGuide(): boolean {
      return this.otherVersionControl.isNotShowGuide
    }
  }
})
